﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

/// <summary>
/// SQ_Eval_Pub 的摘要说明
/// </summary>
public class SQ_Eval_Pub
{
    public SQ_Eval_Pub()
    {
        //
        // TODO: 在此处添加构造函数逻辑
        //
    }

    public static string GetIsUsing(string state)
    {
        string restr = "可用";
        switch (state)
        {
            case "0":
                restr = "<a style=\"color:red\">停用</a>";
                break;
            case "1":
                restr = "<a style=\"color:green\">可用</a>";
                break;
            case "True":
                restr = "<a style=\"color:green\">可用</a>";
                break;
            case "False":
                restr = "<a style=\"color:red\">停用</a>";
                break;

        }
        return restr;
    }

    public static string GetIsZd(string state)
    {
        string restr = "是";
        switch (state)
        {
            case "0":
                restr = "<a style=\"color:red\">否</a>";
                break;
            case "1":
                restr = "<a style=\"color:green\">是</a>";
                break;
            case "True":
                restr = "<a style=\"color:green\">是</a>";
                break;
            case "False":
                restr = "<a style=\"color:red\">否</a>";
                break;

        }
        return restr;
    }
    public static string GetPsType(string type)
    {
        string restr = "部门岗";
        switch (type)
        {

            case "1":
                restr = "<a style=\"color:red\">部门岗</a>";
                break;
            case "2":
                restr = "<a style=\"color:blue\">主管岗</a>";
                break;
            case "3":
                restr = "<a style=\"color:green\">职工岗</a>";
                break;
        }
        return restr;
    }

    public static void GetYearMonth(DateTime now, ref int Year, ref int Month)
    {
        int day = now.Day;
        Year = now.Year;
        Month = now.Month;

    }

    public static string GetTaskStateAndTaskState(string type1, string type2)
    {
        string restr = "";
        switch (type1)
        {
            case "0":
                restr = "<a style=\"color:green\">执行中</a>";
                break;
            case "1":
                if (type2 == "False")
                {
                    restr = "<a style=\"color:red\">未完成</a>";
                }
                else if (type2 == "True")
                {
                    restr = "<a style=\"color:blue\">已完成</a>";
                }
                break;
            case "2":
                restr = "<a style=\"color:red\">未验收</a>";
                break;
        }
        return restr;
    }

    public static string GetTaskState(string type)
    {
        string restr = "";
        switch (type)
        {

            case "0":
                restr = "<a style=\"color:green\">考核中</a>";
                break;
            case "1":
                restr = "<a style=\"color:blue\">已考核</a>";
                break;
        }
        return restr;
    }

    public static string GetTaskState_Task(string type)
    {
        string restr = "";
        switch (type)
        {

            case "False":
                restr = "<a style=\"color:red\">未完成</a>";
                break;
            case "True":
                restr = "<a style=\"color:blue\">已完成</a>";
                break;
        }
        return restr;
    }

    public static string Get_LX_TYPE(string type)
    {
        string restr = "";
        switch (type)
        {

            case "0":
                restr = "<a style=\"color:red\">【首要任务】</a>";
                break;
            case "1":
                restr = "<a style=\"color:#f97e06\" >【基本工作要求】</a>";
                break;
            case "2":
                restr = "<a style=\"color:blue\">【常态化工作】</a>";
                break;
            case "3":
                restr = "<a style=\"color:green\">【附加项】</a>";
                break;
        }
        return restr;
    }

    public static string Get_LX_FD(string type)
    {
        string restr = "";
        switch (type)
        {

            case "0":
                restr = "<a style=\"color:red\">只减不加</a>";
                break;
            case "1":
                restr = "<a style=\"color:#f97e06\">浮动加减</a>";
                break;
            case "2":
                restr = "<a style=\"color:blue\">纯加分</a>";
                break;
            case "3":
                restr = "<a style=\"color:green\">浮动</a>";
                break;

        }
        return restr;
    }

    public static string GetIsZdColor(string state)
    {
        string restr = "style=\"color: red;font-weight:bold\"";
        switch (state)
        {
            case "1":
                restr = "";
                break;
            case "0":
                restr = "style=\"color: red;font-weight:bold\"";
                break;
            case "False":
                restr = "style=\"color: red;font-weight:bold\"";
                break;
            case "True":
                restr = "";
                break;

        }
        return restr;
    }

    public static string GetTaskType(string type)
    {
        string restr = "";
        switch (type)
        {
            case "0":
                restr = "<b style=\"color:blue\">[年度]</b>";
                break;
            case "1":
                restr = "<b style=\"color:green\">[月度]</b>";
                break;
            case "2":
                restr = "<b style=\"color:red\">[临时]</b>";
                break;
        }
        return restr;
    }

    public static string GetAuditType(string type)
    {
        string restr = "";
        switch (type)
        {
            case "Y":
                restr = "<b style=\"color:blue\">[待验]</b>";
                break;
            case "F":
                restr = "<b style=\"color:blue\">[操作]</b>";
                break;
        }
        return restr;
    }

    public static string GetState(string type)
    {
        string restr = "";
        switch (type)
        {
            case "0":
                restr = "<b style=\"color:blue\">[作废]</b>";
                break;
            case "1":
                restr = "<b style=\"color:blue\">[审核通过]</b>";
                break;
            case "2":
                restr = "<b style=\"color:blue\">[审核不通过]</b>";
                break;
            case "3":
                restr = "<b style=\"color:blue\">[执行成功]</b>";
                break;
        }
        return restr;
    }


}